Skip to content

Conversation

spatsatzis
Copy link

I had the following code

..... = new FileUploader.FileItem(uploader, {
size: 1e6,
name: name,
progress: 0,
isUploaded: false,
isSuccess: false
});

In chrome it is working great but in mozilla i get the following exception

Error: Argument 2 of FormData.append does not implement interface Blob.
I ended up at method " FileUploader.prototype._xhrTransport " and line 705

var sendable = new FormData();
......
sendable.append() method needs the second argument to be Blob, but now my code sends an object.

So i had either to do

..... = new FileUploader.FileItem(uploader, new Blob([{
size: 1e6,
name: name,
progress: 0,
isUploaded: false,
isSuccess: false
}]));

or fix it in FileItem constructor.

I had the following code

..... = new FileUploader.FileItem(uploader, {
                        size: 1e6,
                        name: name,
                        progress: 0,
                        isUploaded: false,
                        isSuccess: false
                    });

In chrome it is working great but in mozilla i get the following exception

Error: Argument 2 of FormData.append does not implement interface Blob.
I ended up at method " FileUploader.prototype._xhrTransport " and line 705

var sendable = new FormData();
......
sendable.append() method needs the second argument to be Blob, but now my code sends an object.

So i had either to do 

..... = new FileUploader.FileItem(uploader, new Blob([{
                        size: 1e6,
                        name: name,
                        progress: 0,
                        isUploaded: false,
                        isSuccess: false
                    }]));

or fix it in FileItem constructor.
@spatsatzis
Copy link
Author

Any thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant